/**
 * creater:chuanpeng.zhu@dhc.com.cn
 * create time:2016/1/7
 * describe：缓存设置以及返回按钮设置
 */
var route = function ($stateProvider, $urlRouterProvider) {
  $stateProvider
    /***************example Pages*********************/
    //自动化脚本插入点
    .state('ballSetting', {
     url: '/ballSetting',
     templateUrl:'templates/example/basic/BallSetting.html',
     controller:'BallSettingController'
     })
    .state('ballGame', {
     url: '/ballGame/:settingData',
     templateUrl:'templates/example/basic/BallGame.html',
     controller:'BallGameController'
     })
    .state('timeLine', {
      url: '/timeLine',
      templateUrl: 'templates/example/directive/TimeLine.html',
      controller: 'TimeLineController'
    })
    .state('optionButton', {
      url: '/optionButton',
      templateUrl: 'templates/example/style/OptionButton.html',
      controller: 'OptionButtonController'
    })
    .state('openBrowser', {
     url: '/openBrowser',
     templateUrl:'templates/example/tools/OpenBrowser.html',
     controller:'OpenBrowserController'
     })
    .state('radioCheck', {
     url: '/radioCheck',
     templateUrl:'templates/example/style/RadioCheck.html',
     controller:'RadioCheckController'
     })
    .state('dateBox', {
     url: '/dateBox',
     templateUrl:'templates/example/basic/DateBox.html',
     controller:'DateBoxController'
     })
    .state('collectionRepeat', {
     url: '/collectionRepeat',
     templateUrl:'templates/example/basic/CollectionRepeat.html',
     controller:'CollectionRepeatController'
     })
    .state('iconFont', {
     url: '/iconFont',
     templateUrl:'templates/example/tools/IconFont.html',
     controller:'IconFontController'
     })
    .state('imageFilter', {
     url: '/imageFilter',
     templateUrl:'templates/example/basic/ImageFilter.html',
     controller:'ImageFilterController'
     })
    .state('circleHead', {
     url: '/circleHead',
     templateUrl:'templates/example/style/CircleHead.html',
     controller:'CircleHeadController'
     })
    .state('sideMenu.sideContent', {
      url: '/sideContent',
      views: {
        'menuContent': {
          templateUrl: 'templates/example/basic/SideContent.html'
        }
      }
    })
    .state('sideMenu', {
     url: '/sideMenu',
     abstract: true,
     templateUrl:'templates/example/basic/SideMenu.html',
     controller:'SideMenuController'
     })
    .state('slideBox', {
     url: '/slideBox',
     templateUrl:'templates/example/basic/SlideBox.html',
     controller:'SlideBoxController'
     })
    .state('filterExample', {
     url: '/filterExample',
     templateUrl:'templates/example/basic/FilterExample.html',
     controller:'FilterExampleController'
     })
    .state('saveExample', {
      url: '/saveExample',
      templateUrl: 'templates/example/basic/SaveExample.html',
      controller: 'SaveExampleController'
    })
    .state('popupExample', {
      url: '/popupExample',
      templateUrl: 'templates/example/basic/PopupExample.html',
      controller: 'PopupExampleController'
    })
    .state('pagination', {
      url: '/pagination',
      templateUrl: 'templates/example/basic/Pagination.html',
      controller: 'PaginationController'
    })
    .state('listExample', {
      url: '/listExample',
      templateUrl: 'templates/example/style/ListExample.html',
      controller: 'ListExampleController'
    })
    .state('scrollFix', {
      url: '/scrollFix',
      templateUrl: 'templates/example/basic/ScrollFix.html',
      controller: 'ScrollFixController'
    })
    .state('sendSMS', {
      url: '/sendSMS',
      templateUrl: 'templates/example/directive/SendSMS.html',
      controller: 'SendSMSController'
    })
    .state('areaExample', {
     url: '/areaExample',
     templateUrl:'templates/example/basic/AreaExample.html',
     controller:'AreaExampleController'
     })
    .state('actionSheet', {
     url: '/actionSheet',
     templateUrl:'templates/example/basic/ActionSheet.html',
     controller:'ActionSheetController'
     })
    .state('routeCache', {
     url: '/routeCache',
     templateUrl:'templates/example/basic/RouteCache.html',
     controller:'RouteCacheController'
     })
    .state('theme', {
     url: '/theme',
     templateUrl:'templates/example/basic/Theme.html',
     controller:'ThemeController'
     })
    .state('pageCreator', {
     url: '/pageCreator',
     templateUrl:'templates/example/tools/PageCreator.html',
     controller:'PageCreatorController'
     })
    .state('menu', {
      url: '/menu',
      templateUrl: 'templates/example/Menu.html',
      controller: 'MenuController'
    })
    /***************example Pages*********************/
    //home首页
    .state('area', {
      url: '/area/:flag/:defaultValue/:data/:level',//flag：用来区分是哪个页面选择的地址，广播标识位。defaultValue：默认值，可为空。data：空。',
      templateUrl: 'templates/common/Area.html',
      controller: 'AreaController'
    })
    //home首页
    .state('home', {
      url: '/home',
      templateUrl: 'templates/home/Home.html',
      controller: 'HomeController'
    });

  // if none of the above states are matched, use this as the fallback
  $urlRouterProvider.otherwise('/menu');

};
